package com.rs.statistics.Controller;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.rs.statistics.dao.IStatisticsDao;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping
public class StatisticsController {
@Resource
private IStatisticsDao statisticsDao;
@ApiOperation(value = "基于资源室统计",notes = "基于资源室统计")
@PostMapping("read_room_id")
public Map findAll(@RequestBody int read_room_id) {
	Map map=new HashMap();
	map.put("code" ,0);
	map.put("count", statisticsDao.count());
	map.put("data", statisticsDao.findById(read_room_id));
	return map;
}
}
